package com.dodayum.controller;

import com.dodayum.dto.NginxLogInfoRequestDTO;
import com.dodayum.dto.SearchByResponseDTO;
import com.dodayum.dto.SuccessUrlTop10Response;
import com.dodayum.service.MyEntityHardService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @version 1.0
 * 备注：
 * @Author BaiYu
 * </br>@Date 2024/12/27 10:26
 */
@RestController
@RequestMapping("/hardEasyDemo")
public class MyEntityHardController {

    @Resource
    MyEntityHardService myEntityHardService;

    @PostMapping("/hardQuery")
    public List<SearchByResponseDTO> hardQuery(@RequestBody NginxLogInfoRequestDTO request){
        return myEntityHardService.searchByRequest(request);
    }

    @GetMapping("/successUrlTop10")
    public List<SuccessUrlTop10Response> successTop10() {
        return myEntityHardService.successUrlTop10();
    }

    @GetMapping("/falseIpTop10")
    public Map<String,String> falseTop10(){
        return myEntityHardService.falseIpTop10();
    }

}
